/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entities;

import java.io.Serializable;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author PabloSebastian
 */

public class NonWorkingDay implements Serializable {
    private static final long serialVersionUID = 1L;
    
    protected NonWorkingDayPK nonWorkingDayPK;
    private Pyme pyme;

    public NonWorkingDay() {
    }

    public NonWorkingDay(NonWorkingDayPK nonWorkingDayPK) {
        this.nonWorkingDayPK = nonWorkingDayPK;
    }

    public NonWorkingDay(int day, int month, int year, int pymeidentification) {
        this.nonWorkingDayPK = new NonWorkingDayPK(day, month, year, pymeidentification);
    }

    public NonWorkingDayPK getNonWorkingDayPK() {
        return nonWorkingDayPK;
    }

    public void setNonWorkingDayPK(NonWorkingDayPK nonWorkingDayPK) {
        this.nonWorkingDayPK = nonWorkingDayPK;
    }

    public Pyme getTPyme() {
        return pyme;
    }

    public void setTPyme(Pyme pyme) {
        this.pyme = pyme;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (nonWorkingDayPK != null ? nonWorkingDayPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof NonWorkingDay)) {
            return false;
        }
        NonWorkingDay other = (NonWorkingDay) object;
        if ((this.nonWorkingDayPK == null && other.nonWorkingDayPK != null) || (this.nonWorkingDayPK != null && !this.nonWorkingDayPK.equals(other.nonWorkingDayPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.NonWorkingDay[ nonWorkingDayPK=" + nonWorkingDayPK + " ]";
    }
    
}
